[Up]常用資訊

[重點文章] 重點文章 [重點文章] 重點文章

2021年3月31日 星期三

[windows] Python

[windows] Python

 
#Step 01 – 更新 python


wget https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz
tar xf Python-3.9.2.tar.xz
cd Python-3.9.2

./configure
make
make install 

update-alternatives --install /usr/bin/python python /usr/local/bin/python3.9 10

ln -s /usr/share/pyshared/lsb_release.py /usr/local/lib/python3.9/site-packages/lsb_release.py

pip3 install --upgrade pip

python --version

 









#Step 02 – 安裝phpipam


$ sudo mysql -u root -p

CREATE DATABASE phpipam;
GRANT ALL ON phpipam.* TO phpipam@localhost IDENTIFIED BY 'StrongDBPassword';
FLUSH PRIVILEGES;
QUIT;

sudo git clone --recursive https://github.com/phpipam/phpipam.git /var/www/html/phpipam


cd /var/www/html/phpipam
cp config.dist.php config.php

# vi config.php
/**
* database connection details
******************************/
$db['host'] = 'localhost';
$db['user'] = 'phpipam';
$db['pass'] = 'StrongDBPassword';
$db['name'] = 'phpipam';
$db['port'] = 3306;

#修目錄 為 /phpipam/

chown -R nginx:nginx /var/www/html
systemctl restart nginx

mysql -u root -p phpipam < /var/www/html/phpipam/db/SCHEMA.sql

修改中文語系
# dpkg-reconfigure locales (安裝語系)
# apt-get install xfonts-intl-chinese

預設登入

Username: admin
Password: ipamadmin

沒有留言:

張貼留言