CentOS Standalone Installation Nginx, Gitlab, Nexus, MySQL coexistence

Source: Internet
Author: User
Tags openssl

The idea is different system set different port number, through Nginx do reverse proxy binding different domain names.

Nginx Installation

1, install pcre software package (make Nginx support HTTP rewrite module)
Yum Install-y pcre
Yum Install-y pcre-devel

2. Installing OpenSSL (enabling Nginx to support SSL)
Yum Install-y openssl-devel

3. Create user
Groupadd Nginx
Useradd-g Nginx Nginx

3. Installing Nginx
[Email protected] nginx-1.11.2]#./configure
--group=nginx
--user=nginx
--prefix=/usr/local/nginx
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx
--with-http_stub_status_module
--with-http_ssl_module
--with-http_gzip_static_module
--with-pcre
[[email protected] nginx-1.11.2]# make &&make Install

Java JDK Installation

1. Download JDK 1.8 rpm version
wget http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/ jdk-8u131-linux-x64.rpm? authparam=1498115333_37339e0bf2e86e03fe12a60f9ab41687

2. Installation
RPM-IVH jdk-8u131-linux-x64.rpm

3. Configure Environment variables
Vi/etc/profile
Add the following:
Java_home=/usr/java/jdk1.8.0_25
Jre_home=/usr/java/jdk1.8.0_25/jre
Path= $PATH: $JAVA _home/bin: $JRE _home/bin
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Export Java_home jre_home PATH CLASSPATH
Make the changes effective
[[email protected] ~]# source/etc/profile//Make changes effective immediately
[[email protected] ~]# echo $PATH//view PATH value

Gitlab Installation

1, RPM mode installation Gitlab
[Email protected] src]# rpm-i gitlab-ce-8.7.0-ce.0.el7.x86_64.rpm

2. Initialization
[Email protected] bin]#/opt/gitlab/bin/gitlab-ctl reconfigure

3, modify the Gitlab default Nginx port number
[Email protected] conf]# vim/var/opt/gitlab/nginx/conf/gitlab-http.conf
[Email protected] conf]#/opt/gitlab/bin/gitlab-ctl restart

4. Modify the Code URL
[Email protected] gitlab]# vim/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
[Email protected] gitlab]#/opt/gitlab/bin/gitlab-ctl restart


Maven Private Warehousing Nexus Installation
1. Download
wget https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.3.2-02-unix.tar.gz

2. Installation
Unzip the use

3. Start
./bin/nexus Run &
Default Port 8081
Default account password admin/admin123

MySQL Installation

1, install according to lazy bag
Yum-y install make gcc-c++ cmake bison-devel ncurses-devel

2. Compile and install
CMake \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/usr/local/mysql/data \
-DSYSCONFDIR=/ETC \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_readline=1 \
-dmysql_unix_addr=/var/lib/mysql/mysql.sock \
-dmysql_tcp_port=3306 \
-denabled_local_infile=1 \
-dwith_partition_storage_engine=1 \
-dextra_charsets=all \
-ddefault_charset=utf8 \
-ddefault_collation=utf8_general_ci

Make && make install

3. Create Group Users
Groupadd MySQL
useradd-g MySQL MySQL

4. Modify Directory Permissions
Chown-r mysql:mysql/usr/local/mysql/
Chown-r Mysql:mysql/var/data/mysql

5. Initialization
Cd/usr/local/mysql
scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysql

6. Add service startup
CP Support-files/mysql.server/etc/init.d/mysql
Chkconfig MySQL on
Service MySQL Start--start MySQL

7. Add local MySQL environment variable
Modify the/etc/profile file to add at the end of the file
Path=/usr/local/mysql/bin: $PATH
Export PATH

Close the file, run the following command, and let the configuration take effect immediately
Source/etc/profile

8. Log in and set password, turn on remote access
Mysql-uroot
mysql> SET PASSWORD = PASSWORD (' 123456 ');
Mysql> GRANT All privileges on * * to ' root ' @ ' 172.16.% ' identified by ' password ' with GRANT OPTION;

CentOS Standalone Installation Nginx, Gitlab, Nexus, MySQL coexistence

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.