Tengine安装
[root@localhost tengine-2.1.2]# tar xf tengine-2.1.2.tar.gz
[root@localhost tengine-2.1.2]# useradd -s /bin/false -r tengine
关于tengine,是阿里根据Nginx再次修改的,关于源码编译的核心之处在于按需编译,之前文档也有写到,所以这里只指定安装路径等基础信息,其他将不指定;
[root@localhost tengine-2.1.2]# yum -y install openssl-devel pcre-devel
[root@localhost tengine-2.1.2]# ./configure –prefix=/usr/local/tengine –user=tengine –group=tengine
[root@localhost tengine-2.1.2]# make && make install
设置成开机自启:
[root@localhost sbin]# vim /usr/lib/systemd/system/tengined.service
1 | [Unit] |
[root@localhost sbin]# systemctl enable tengined.service
关于tomcat不做叙述,以前文章中有…
http://geasyheart.blog.163.com/blog/static/242548036201593094744315
redis安装
[root@localhost ~]# wget -c http://download.redis.io/releases/redis-3.2.0.tar.gz
[root@localhost ~]# tar xf redis-3.2.0.tar.gz -C /usr/local
[root@localhost redis-3.2.0]# yum -y install tcl
[root@localhost redis-3.2.0]# make && make test && make install
启动脚本:
1 | [Unit] |
安装postgresql
[root@localhost ~]# wget -c https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
[root@localhost ~]# rpm -ivh pgdg-centos95-9.5-2.noarch.rpm
[root@localhost ~]# yum -y install postgresql95-server postgresql95-contrib
[root@localhost ~]# systemctl enable postgresql-9.5.service
初始化数据库
[root@localhost ~]# /usr/pgsql-9.5/bin/postgresql95-setup initdb
[root@localhost ~]# systemctl start postgresql-9.5.service配置文件位置
[root@localhost ~]# vim /var/lib/pgsql/9.5/data/pg_hba.conf
配置密码
[root@localhost ~]# su postgres
[root@localhost ~]# psql -U postgres
postgres=# alter user postgres with password ‘your_password’;
防火墙
[root@localhost ~]# vim /usr/lib/firewalld/services/postgres95.xml
1 | <?xml version="1.0" encoding="utf-8"?> |
[root@localhost ~]# firewall-cmd –permanent –add-service=postgres95
如果不成功:
[root@localhost ~]# firewall-cmd –permanent –add-port=5432/tcp
[root@localhost ~]# firewall-cmd –permanent –reload
当然,也可以关闭防火墙。
[错误]
PID file /your_path/nginx.pid not readable (yet?) after start.
这个就是你启动脚本和配置文件的pid不一致导致的