王海庆的云笔记

部署itam(IT资产管理系统)


关闭防火墙

systemctl stop firewalld
systemctl disable firewalld
sed -i -e  's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
setenforce 0


换成阿里云的源

rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum clean all
yum makecache fast -y


公司里CentOS7的源

rm -rf /etc/yum.repos.d/*
cat >  /etc/yum.repos.d/centos7.repo << EOF
[base]
name=base
baseurl=http://172.18.0.61/centos7/base
enabled=1
gpgcheck=0

[extras]
name=extras
baseurl=http://172.18.0.61/centos7/extras
enabled=1
gpgcheck=0

[updates]
name=updates
baseurl=http://172.18.0.61/centos7/updates
enabled=1
gpgcheck=0

[epel]
name=epel
baseurl=http://172.18.0.61/centos7/epel
enabled=1
gpgcheck=0
EOF

yum clean all
yum makecache fast -y


安装pip

yum install python-pip -y


更新pip,不能安装最新的

pip install --upgrade pip==20.3.4 -i https://mirrors.aliyun.com/pypi/simple/
pip install --upgrade pip==20.3.4 -i http://172.18.0.69:8081/repository/pip-group/simple/ --trusted-host 172.18.0.69


下载代码

git clone https://github.com/jidong9527/itam


允许任何主机访问

vi ./itam/settings.py
ALLOWED_HOSTS = ['*']


安装pip包

pip install -r requirements.txt
或者
pip install Django==1.8.17 
pip install IPy==0.75 
pip install olefile==0.44 
pip install Pillow==4.2.0 
pip install pytz==2017.2


运行

python manage.py runserver 0.0.0.0:8000


访问

http://172.18.0.98:8000/
admin/admin



itam.zip

参考

https://github.com/jidong9527/itam

文章最后更新时间: 2022-06-02 10:17:19