cd
git clone https://github.com/FierceBengalTiger/ubuntu-server-setup-script.git
cd ubuntu-server-setup-script
chmod +x install.sh
sudo ./install.sh
-
It will create and configure your server.
-
Just you need to add the vhost conf files as per your requirements. [We include the sample conf files]
-
Just you need to configure your Jenkins configuration.
-
Lastly it also install the mysql secure installation script so you need to configure your DB settings.
sudo cp /server-setup-script/sample_conf /etc/nginx/sites-available/example.com.conf
sudo ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
sudo vim /etc/nginx/sites-available/example.com.conf
sudo cp /server-setup-script/sample_ssl_conf /etc/nginx/sites-available/example.com.conf
sudo ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
sudo vim /etc/nginx/sites-available/example.com.conf
-
Change
example.com.conf
as per yours. -
Find
# Modify - ....
on conf file and change as per yours.
sudo systemctl restart nginx
sudo systemctl status nginx
mysql -u root -p
CREATE DATABASE example_db;
CREATE USER 'example_dbuser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON example_db.* TO 'example_dbuser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
-
Change
example_db
,example_dbuser
andyourpassword
as per yours.
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Special thanks to Behestee bhaiya.