七月

男儿到死心如铁。看试手,补天裂

欢迎来到我的博客~


阿里云学习

查看阿里云默认安装python版本

python -V

查看python安装路径

which python

cd /usr/bin/

安装

安装依赖

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

下载python3

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

配置 nginx

vi /etc/nginx/conf.d/default.conf

nginx 80端口占用 fix

killall -9 nginx

重启nginx

service nginx restart

查看安装包

vi /etc/nginx/conf.d/default.conf

rpm -e –nodeps 包的名称

安装位置

mkdir -p /usr/local/python3

解压

tar -zxvf Python-3.6.1.tgz

编译安装

cd Python-3.6.1

./configure –prefix=/usr/local/python3

make && make install

建立软连接

ln -s /usr/local/python3/bin/python3 /usr/bin/python3

将/usr/local/python3/bin加入PATH

vim ~/.bash_profile

 # .bash_profile
 # Get the aliases and functions
 if [ -f ~/.bashrc ]; then
 . ~/.bashrc
 fi
 # User specific environment and startup programs
 PATH=$PATH:$HOME/bin:/usr/local/python3/bin
 export PATH

使修改后文件生效

source ~/.bash_profile

从服务器下拉文件

sudo scp -r root@xx.105.xx.49:/root/ 本地路径

把本地文件上传到服务器

sudo scp -r /本地路径 root@xx.105.xx.49:/root/

查看数据库状态并启动

/etc/rc.d/init.d/mysqld status

/etc/init.d/mysqld start

mysql -u root -p

重启php-fpm

service php-fpm restart

/etc/init.d/php-fpm restart

重启nginx

service nginx restart

或者

/etc/init.d/nginx reload

/etc/init.d/php-fpm reload

完成。

卖萌🐶

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦