最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【已解决】CentOS中安装web集成环境:OneinStack

安装 crifan 100浏览 0评论
折腾:
【记录】给腾讯云香港服务器CentOS中搭建WordPress官网主页
期间,需要去CentOS中安装OneinStack,用于后续使用web环境。
OneinStack centos 7
lj2007331/oneinstack: OneinStack – A PHP/JAVA Deployment Tool
CentOS7使用oneinstack安装全能环境 – 鲁凯啸的得瑟窝 – CSDN博客
关于 CentOS7 安装 – OneinStack
下载 – OneinStack
自动安装 – OneinStack
交互安装 – OneinStack
先去安装:
yum -y install wget screen
过程:
[root@VM_0_10_centos ~]# yum -y install wget screen
Loaded plugins: fastestmirror, langpacks
epel                                                                                                                                                           | 3.2 kB  00:00:00     
extras                                                                                                                                                         | 3.4 kB  00:00:00     
os                                                                                                                                                             | 3.6 kB  00:00:00     
updates                                                                                                                                                        | 3.4 kB  00:00:00     
(1/7): epel/7/x86_64/group_gz                                                                                                                                  |  88 kB  00:00:00     
(2/7): epel/7/x86_64/updateinfo                                                                                                                                | 934 kB  00:00:00     
(3/7): updates/7/x86_64/primary_db                                                                                                                             | 1.3 MB  00:00:00     
(4/7): extras/7/x86_64/primary_db                                                                                                                              | 153 kB  00:00:00     
(5/7): os/7/x86_64/group_gz                                                                                                                                    | 166 kB  00:00:00     
(6/7): epel/7/x86_64/primary                                                                                                                                   | 3.6 MB  00:00:00     
(7/7): os/7/x86_64/primary_db                                                                                                                                  | 6.0 MB  00:00:00     
Determining fastest mirrors
epel                                                                                                                                                                      12725/12725
Resolving Dependencies
--> Running transaction check
---> Package screen.x86_64 0:4.1.0-0.25.20120314git3c2946.el7 will be installed
---> Package wget.x86_64 0:1.14-13.el7 will be updated
---> Package wget.x86_64 0:1.14-18.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================================
Package                               Arch                                  Version                                                          Repository                         Size
======================================================================================================================================================================================
Installing:
screen                                x86_64                                4.1.0-0.25.20120314git3c2946.el7                                 os                                552 k
Updating:
wget                                  x86_64                                1.14-18.el7                                                      os                                547 k

Transaction Summary
======================================================================================================================================================================================
Install  1 Package
Upgrade  1 Package

Total download size: 1.1 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): wget-1.14-18.el7.x86_64.rpm                                                                                                                             | 547 kB  00:00:00     
(2/2): screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm                                                                                                      | 552 kB  00:00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                 1.0 MB/s | 1.1 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : wget-1.14-18.el7.x86_64                                                                                                                                            1/3
  Installing : screen-4.1.0-0.25.20120314git3c2946.el7.x86_64                                                                                                                     2/3
  Cleanup    : wget-1.14-13.el7.x86_64                                                                                                                                            3/3
  Verifying  : screen-4.1.0-0.25.20120314git3c2946.el7.x86_64                                                                                                                     1/3
  Verifying  : wget-1.14-18.el7.x86_64                                                                                                                                            2/3
  Verifying  : wget-1.14-13.el7.x86_64                                                                                                                                            3/3

Installed:
  screen.x86_64 0:4.1.0-0.25.20120314git3c2946.el7                                                                                                                                    

Updated:
  wget.x86_64 0:1.14-18.el7                                                                                                                                                           

Complete!
再去下载,结果报错:
[root@VM_0_10_centos ~]# wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz
--2018-12-05 20:53:14--  http://mirrors.linuxeye.com/oneinstack-full.tar.gz
Resolving mirrors.linuxeye.com (mirrors.linuxeye.com)... failed: Name or service not known.
wget: unable to resolve host address irrors.linuxeye.com
[root@VM_0_10_centos ~]#
最后换用:
https://oneinstack.com/download/
的:
sourceforge,包含源码
才下载成功:
[root@VM_0_10_centos ~]# wget http://downloads.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz
--2018-12-05 20:54:46--  http://downloads.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.105.38.13
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.105.38.13|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://nchc.dl.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz [following]
--2018-12-05 20:54:46--  https://nchc.dl.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz
Resolving nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)... 211.79.60.17, 2001:e10:ffff:1f02::17
Connecting to nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)|211.79.60.17|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 252753548 (241M) [application/x-gzip]
Saving to: neinstack-full.tar.gz

16% [======================>                                                                                                                      ] 41,852,928  2.48MB/s  eta 80s  
然后去解压:
[root@VM_0_10_centos ~]# ll -lha
total 242M
dr-xr-x---.  7 root root 4.0K Dec  5 21:04 .
dr-xr-xr-x. 19 root root 4.0K Dec  5 21:04 ..
-rw-------   1 root root  678 Dec  5 21:04 .bash_history
-rw-r--r--.  1 root root   18 Dec 29  2013 .bash_logout
-rw-r--r--.  1 root root  176 Dec 29  2013 .bash_profile
-rw-r--r--.  1 root root  176 Dec 29  2013 .bashrc
drwxr-xr-x   3 root root 4.0K Mar 15  2018 .cache
drwxr-xr-x   3 root root 4.0K Mar 15  2018 .config
-rw-r--r--.  1 root root  100 Dec 29  2013 .cshrc
drwxr-xr-x   7 root root 4.0K Dec  5 15:53 oneinstack
-rw-r--r--   1 root root 242M Dec  5 15:54 oneinstack-full.tar.gz
drwxr-xr-x   2 root root 4.0K Dec  4 22:47 .pip
-rw-r--r--   1 root root   73 Dec  4 22:47 .pydistutils.cfg
drwx------   2 root root 4.0K Mar 19  2018 .ssh
-rw-r--r--.  1 root root  129 Dec 29  2013 .tcshrc
-rw-------   1 root root    0 Dec  4 22:47 .viminfo
[root@VM_0_10_centos ~]# tar xvf oneinstack-full.tar.gz
然后进去:
[root@VM_0_10_centos ~]# cd oneinstack/
[root@VM_0_10_centos oneinstack]# ll
total 248
-rwxr-xr-x 1 root root 25082 Dec  5 15:53 addons.sh
-rwxr-xr-x 1 root root 18475 Dec  5 15:53 backup_setup.sh
-rwxr-xr-x 1 root root  7857 Dec  5 15:53 backup.sh
drwxr-xr-x 2 root root  4096 Dec  5 15:53 config
drwxr-xr-x 2 root root  4096 Dec  5 15:53 include
drwxr-xr-x 2 root root  4096 Dec  5 15:53 init.d
-rwxr-xr-x 1 root root 43738 Dec  5 15:53 install.sh
-rw-r--r-- 1 root root 11358 Dec  5 15:53 LICENSE
-rw-r--r-- 1 root root  2382 Dec  5 15:53 options.conf
-rwxr-xr-x 1 root root  5515 Dec  5 15:53 pureftpd_vhost.sh
-rw-r--r-- 1 root root  5480 Dec  5 15:53 README.md
-rwxr-xr-x 1 root root  4927 Dec  5 15:53 reset_db_root_password.sh
drwxr-xr-x 2 root root  4096 Dec  5 15:53 src
-rwxr-xr-x 1 root root 10357 Dec  5 15:53 ss.sh
drwxr-xr-x 2 root root  4096 Dec  5 15:53 tools
-rwxr-xr-x 1 root root 16079 Dec  5 15:53 uninstall.sh
-rwxr-xr-x 1 root root  4698 Dec  5 15:53 upgrade.sh
-rw-r--r-- 1 root root  1786 Dec  5 15:53 versions.txt
-rwxr-xr-x 1 root root 47501 Dec  5 15:53 vhost.sh
再去:
screen -S oneinstack
./install.sh
接着就开始了:
Please input SSH port(Default: 22):

Do you want to enable iptables? [y/n]: n

Do you want to install Web server? [y/n]: y

Please select Nginx server:
        1. Install Nginx
        2. Install Tengine
        3. Install OpenResty
        4. Do not install
Please input a number:(Default 1 press Enter) 1

Please select Apache server:
        1. Install Apache-2.4
        2. Install Apache-2.2
        3. Do not install
Please input a number:(Default 3 press Enter) 3

Please select tomcat server:
        1. Install Tomcat-9
        2. Install Tomcat-8
        3. Install Tomcat-7
        4. Install Tomcat-6
        5. Do not install
Please input a number:(Default 5 press Enter) 5

Do you want to install Database? [y/n]: y

Please select a version of the Database:
         1. Install MySQL-8.0
         2. Install MySQL-5.7
         3. Install MySQL-5.6
         4. Install MySQL-5.5
         5. Install MariaDB-10.3
         6. Install MariaDB-10.2
         7. Install MariaDB-10.1
         8. Install MariaDB-10.0
         9. Install MariaDB-5.5
        10. Install Percona-5.7
        11. Install Percona-5.6
        12. Install Percona-5.5
        13. Install AliSQL-5.6
        14. Install PostgreSQL
        15. Install MongoDB
Please input a number:(Default 2 press Enter) 2
Please input the root password of MySQL(default: SdeqnJkQ): Daryun@2019

Please choose installation of the database:
        1. Install database from binary package.
        2. Install database from source package.
Please input a number:(Default 1 press Enter) 1

Do you want to install PHP? [y/n]: y

Please select a version of the PHP:
        1. Install php-5.3
        2. Install php-5.4
        3. Install php-5.5
        4. Install php-5.6
        5. Install php-7.0
        6. Install php-7.1
        7. Install php-7.2
Please input a number:(Default 5 press Enter) 5

Do you want to install opcode cache of the PHP? [y/n]: y
Please select a opcode cache of the PHP:
        1. Install Zend OPcache
        3. Install APCU
Please input a number:(Default 1 press Enter) 1

Do you want to install ionCube? [y/n]: n

Do you want to install ImageMagick or GraphicsMagick? [y/n]: n

Do you want to install Pure-FTPd? [y/n]: y

Do you want to install phpMyAdmin? [y/n]: y

Do you want to install redis? [y/n]: y

Do you want to install memcached? [y/n]: y

Do you want to install HHVM? [y/n]: n

然后就是自动的过程了:
Package wget-1.14-18.el7.x86_64 already installed and latest version
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
设置MySQL数据库密码
php ImageMagick 用途
图像处理的,此处用不到所以不安装。
后续继续安装:
已过20分钟了
安装到了redis了
过了26分钟,安装完毕:
####################Congratulations########################
Total OneinStack Install Time: 26 minutes

Nginx install dir:              /usr/local/nginx

Database install dir:           /usr/local/mysql
Database data dir:              /data/mysql
Database user:                  root
Database password:              Daryun@2019

PHP install dir:                /usr/local/php
Opcache Control Panel URL:      http://xxx/ocp.php

Pure-FTPd install dir:          /usr/local/pureftpd
Create FTP virtual script:      ./pureftpd_vhost.sh

phpMyAdmin dir:                 /data/wwwroot/default/phpMyAdmin
phpMyAdmin Control Panel URL:   http://xxx/phpMyAdmin

redis install dir:              /usr/local/redis

memcached install dir:          /usr/local/memcached

Index URL:                      http://xxx/

Please restart the server and see if the services start up fine.
然后再去看是否正常能打开主页:
重启后:
[root@VM_0_10_centos ~]# service nginx status
Redirecting to /bin/systemctl status  nginx.service
[0m nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-12-05 21:59:31 CST; 25s ago
     Docs: http://nginx.org/en/docs/
  Process: 2016 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
  Process: 2002 ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf (code=exited, status=0/SUCCESS)
  Process: 1892 ExecStartPre=/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 2013 (nginx)
   CGroup: /system.slice/nginx.service
           2013 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
           2018 nginx: worker process

Dec 05 21:59:31 VM_0_10_centos systemd[1]: Starting nginx - high performance web server...
Dec 05 21:59:31 VM_0_10_centos nginx[1892]: nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
Dec 05 21:59:31 VM_0_10_centos nginx[1892]: nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Dec 05 21:59:31 VM_0_10_centos systemd[1]: Started nginx - high performance web server.
[root@VM_0_10_centos ~]#
Welcome to use OneinStack
正常工作了。
还有其他很多子页面,有很多不错的参考资料:
How to add a virtual host?
http://150.109.59.15/###db
PHP Prober
How to manage service?

Nginx/Tengine/OpenResty:
service nginx {start|stop|status|restart|reload|configtest}
MySQL/MariaDB/Percona:
service mysqld {start|stop|restart|reload|status}
PostgreSQL:
service postgresql {start|stop|restart|status}
MongoDB:
service mongod {start|stop|status|restart|reload}
PHP:
service php-fpm {start|stop|restart|reload|status}
HHVM:
service supervisord {start|stop|status|restart|reload}
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}
Memcached:
service memcached {start|stop|status|restart|reload}
目前结果是:
[root@VM_0_10_centos ~]# service mysqld status
MySQL running (4191)                                       [  OK  ]
[root@VM_0_10_centos ~]# service mongod status
Redirecting to /bin/systemctl status  mongod.service
Unit mongod.service could not be found.
[root@VM_0_10_centos ~]# service php-fpm status
php-fpm (pid 2213) is running...
[root@VM_0_10_centos ~]# service redis-server status
Redirecting to /bin/systemctl status  redis-server.service
[0m redis-server.service - Redis In-Memory Data Store
   Loaded: loaded (/usr/lib/systemd/system/redis-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-12-05 21:59:31 CST; 4min 27s ago
  Process: 1933 ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf (code=exited, status=0/SUCCESS)
  Process: 1905 ExecStartPre=/bin/chown -R redis:redis ${statedir} (code=exited, status=0/SUCCESS)
  Process: 1889 ExecStartPre=/bin/mkdir -p ${statedir} (code=exited, status=0/SUCCESS)
Main PID: 1982 (redis-server)
   CGroup: /system.slice/redis-server.service
           1982 /usr/local/redis/bin/redis-server 127.0.0.1:6379

Dec 05 21:59:31 VM_0_10_centos systemd[1]: Starting Redis In-Memory Data Store...
Dec 05 21:59:31 VM_0_10_centos systemd[1]: PID file /var/run/redis/redis.pid not readable (yet?) after start.
Dec 05 21:59:31 VM_0_10_centos systemd[1]: Started Redis In-Memory Data Store.
[root@VM_0_10_centos ~]# service memcached status
[0m memcached.service - SYSV: The memcached daemon is a network memory cache service.
   Loaded: loaded (/etc/rc.d/init.d/memcached; bad; vendor preset: disabled)
   Active: active (running) since Wed 2018-12-05 21:59:32 CST; 4min 31s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2232 ExecStart=/etc/rc.d/init.d/memcached start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/memcached.service
           2292 /usr/local/memcached/bin/memcached -d -p 11211 -u memcached -m 124 -c 1024 -P /var/run/memcached/memcached.pid -l 127.0.0.1

Dec 05 21:59:32 VM_0_10_centos systemd[1]: Starting SYSV: The memcached daemon is a network memory cache service....
Dec 05 21:59:32 VM_0_10_centos memcached[2232]: Starting memcached: [  OK  ]
Dec 05 21:59:32 VM_0_10_centos systemd[1]: Started SYSV: The memcached daemon is a network memory cache service..
【总结】
至此,就安装完毕了。
基本逻辑是:
参考:
交互安装 – OneinStack
去:
yum -y install wget screen
参考:
https://oneinstack.com/download/
下载:
wget http://downloads.sourceforge.net/project/oneinstack/oneinstack-full.tar.gz
然后安装
tar xvf oneinstack-full.tar.gz
cd oneinstack/
screen -S oneinstack
./install.sh
就是参考:
https://oneinstack.com/install/
填写参数
安装完毕后,重启,nginx确保正常运行,访问主页,可以看到OneinStack页面了。

转载请注明:在路上 » 【已解决】CentOS中安装web集成环境:OneinStack

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
15 queries in 0.071 seconds, using 9.48MB memory