标签:bzip 源代码 sqllite mysql配置 serve 程序安装 path变量 ble error
安装python3.6 安装python前的库环境,非常重要 yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel
sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y 1、下载3.6的压缩包 https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz 2、将压缩包包存在liunx的opt目录下 cd /opt 3、生成 Makefile ./configure --prefix=/usr 4、编译 直接执行make指令,会调用gcc编译工具,开始编译python的c语言代码 5、编译且安装,走到这一步,才是真正的生成/opt/python36/这个文件夹,以及python3解释器 make install 6、添加环境变量 查看PATH变量的值 echo $PATH 7、添加python3的解释器目录,加入path,修改path变量的值 PATH="/opt/python36/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin" 8、写入一个全局变量配置文件,每次开机都生效 vim /etc/profile ctrl + d 快速退出会话 ctrl + shift + r 快速登录
安装django 1、使用豆瓣源下载django pip3 install -i https://pypi.douban.com/simple django==1.11.9 2、创建django项目 django-admin startproject mycrm 创建django应用 django-admin startapp app01 3、注意修改django的settings.py文件 全局查找settings.py find / -name "settings.py" /usr/lib64/python2.7/site-packages/orca/settings.py 切换到django的settings目录下 ALLOW_HOSTS=[*]
注册应用 4、运行django python3.6 manage.py runsevser 127.0.0.1:8000
关闭防火墙 systemctl stop NetworkManager.service
systemctl stop firewalld.service
1、查看是否安装mysql rpm -qa | grep mariadb 2、 配置文件 vim /etc/yum.repos.d/MariaDB.repo [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 3、安装 yum install MariaDB-server MariaDB-client -y # 查看是否安装过mysql # rpm -qa | grep mysql (如果安装过mysql就需要卸载) rpm -e 安装的mysql rpm -e --nodeps # 强制删除 4、启动 systemctl start mariadb # 查看端口 netstat -atnlp | grep 3306 5、查看启动状态 systemctl status mariadb 6、确保mariadb服务器启动后,执行命令初始化 mysql_secure_installation 配置mysql 中文编码设置,编辑mysql配置文件/etc/my.cnf,下入以下内容 [mysqld] character-set-server=utf8 collation-server=utf8_general_ci log-error=/var/log/mysqld.log [client] default-character-set=utf8 [mysql] default-character-set=utf8
卸载yum安装的ngjnx
1
|
yum remove nginx - y |
编译安装nginx的步骤 1.解决软件依赖 yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel
openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
gdbm-devel db4-devel libpcap-devel xz-devel openssl openssl-devel -y 2.下载nginx的源代码包,这里用的淘宝的tengine wget http://tengine.taobao.org/download/tengine-2.3.1.tar.gz 3.解压缩tnginx包 tar -zxvf tengine-2.3.1.tar.gz 4.进入源码目录,开始编译三部曲 ./configure --prefix=/opt/tngx231/ make && make install 5.可以使用了 发现缺少sqllite这个一个软件依赖包,就得直接删除编译好的软件,重新编译即可 6.进入安装好的tngx321目录,查看有哪些东西 conf 存放nginx的配置文件 html 存放前端文件的 logs 存放nginx的日志文件 进入sbin 启动nginx ./nginx 7.配置path变量,可以快捷使用nginx命令 vim /etc/profile PATH=‘/opt/python36/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/opt/tngx231/sbin‘ 8.查看nginx的首页文件 index.html
标签:bzip 源代码 sqllite mysql配置 serve 程序安装 path变量 ble error
原文地址:https://www.cnblogs.com/youxiu123/p/11624311.html