标签:
# LNMP环境的配置
参照文档:https://oneinstack.com/install/
安装文件位置:/data/soft;
```
yum -y install wget screen python #for CentOS/Redhat
# apt-get -y install wget screen python #for Debian/Ubuntu
wget http://aliyun-oss.linuxeye.com/oneinstack-full.tar.gz #阿里云用户下载
wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz #包含源码,国内外均可下载
wget http://mirrors.linuxeye.com/oneinstack.tar.gz #不包含源码,建议仅国外主机下载
tar xzf oneinstack-full.tar.gz
cd oneinstack #如果需要修改目录(安装、数据存储、Nginx日志),请修改options.conf文件
screen -S oneinstack #如果网路出现中断,可以执行命令`screen -r oneinstack`重新连接安装窗口
./install.sh **#注:请勿sh install.sh或者bash install.sh这样执行**
```
开启了安装,参照下图进行安装
[Image: file:///C:/-/blob/bKFAAACXkJD/E6rgRZt8J20n8IlKpz5z0A]安装完成后如果需要添加组件,请在安装文件目录下使用以下命令:
```
./addons.sh
```
[Image: file:///C:/-/blob/bKFAAACXkJD/3f7JNOarbrA_pq6PCqCz5g]到了常用功能的设置:
## NO1:添加虚拟主机:
```
./vhost.sh
```
[Image: file:///C:/-/blob/bKFAAACXkJD/3TmoaERQ3yq4jaOuCmoIQg]有增必有减:
## 删除虚拟主机:
```
./vhost.sh del
```
[Image: file:///C:/-/blob/bKFAAACXkJD/1Yr4N-tWm1XK7dBZBmomhg]有了虚拟主机,怎么可以少了ftp呢
## 管理ftp账号
```
./pureftpd_vhost.sh
```
[Image: file:///C:/-/blob/bKFAAACXkJD/UkNRhslUghJBZrkUXtFzYQ]工作做好了,必须要备份啊。不然万一杯具了呢
```
./backup_setup.sh # Set backup options
```
[Image: file:///C:/-/blob/bKFAAACXkJD/CYQ9V3BihsukcVokm5IjjQ]
```
./backup.sh # Start backup, You can add cron jobs
# crontab -l # Examples
0 1 * * * cd ~/oneinstack;./backup.sh > /dev/null 2>&1 &
```
哒哒哒,做了这么多工作了,为了更好的用,去管理服务吧
Nginx/Tengine:
```
service nginx {start|stop|status|restart|reload|configtest}
```
MySQL/MariaDB/Percona:
```
service mysqld {start|stop|restart|reload|status}
```
PHP:
```
service php-fpm {start|stop|restart|reload|status}
```
HHVM:
```
service supervisord {start|stop|status|restart|reload}
```
**注**:hhvm进程交给supervisord管理,了解更多请访问《[Supervisor管理hhvm进程](https://blog.linuxeye.com/408.html)》
Apache:
```
service httpd {start|restart|stop}
```
Tomcat:
```
service tomcat {start|stop|status|restart}
```
Pure-Ftpd:
```
service pureftpd {start|stop|restart|status}
```
Redis:
```
service redis-server {start|stop|status|restart|reload}
```
Memcached:
```
service memcached {start|stop|status|restart|reload}
```
万一更新了呢,不会更新岂不是很傻眼
```
./upgrade.sh
```
[Image: file:///C:/-/blob/bKFAAACXkJD/tc1ftiyVilSF1s4FUMpE6A]不想用了,想要丢弃它,肿么办呢
```
./uninstall.sh
```
[Image: file:///C:/-/blob/bKFAAACXkJD/zsj04ahJOheTSv6j1KW3vg]如果全部使用的是默认配置,那么以下文件的位置可以帮助你更快的去使用集成环境
所有的配置文件在:oneinstack/config
标签:
原文地址:http://www.cnblogs.com/Chengjinshuai/p/5768385.html