How To Install OpenCMS with Nginx Mariadb On Ubuntu 18.04
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OpenCMS is an opensource content management framework based on Java… It helps content managers to create and maintain beautiful websites fast and efficiently….. Developed by Alkacon Software, it supports multi-language, multi-site on an enterprise-scale |
Offcial Website: http://www.opencms.org/en/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit | IP address- 192.168.1.50 | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; echo $JAVA_HOME ; java -version ; javac -version
JAVA_HOME:/usr/java/jdk-12.0.2
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 ; add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.biznetgio.com/mariadb/repo/10.4/ubuntu bionic main'
apt update ; apt install -y build-essential software-properties-common curl gdebi net-tools wget sqlite3 dirmngr nano lsb-release apt-transport-https mariadb-server mariadb-client nginx -y
mysql_secure_installation
Mariadb Username/Pass: root/password
groupadd tomcat ; useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
cd /opt/ ; wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.8/bin/apache-tomcat-9.0.8.tar.gz
tar -xzvf apache-tomcat-9.0.8.tar.gz ; mv apache-tomcat-9.0.8/ tomcat/
chmod -R 777 /opt/tomcat/ ; chown tomcat:tomcat -R /opt/tomcat/
nano ~/.bashrc
export CATALINA_HOME=/opt/tomcat
source ~/.bashrc ; echo $CATALINA_HOME
nano /etc/systemd/system/apache-tomcat.service
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/java/jdk-12.0.2
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
systemctl daemon-reload ; systemctl start apache-tomcat ; systemctl enable apache-tomcat ; systemctl status apache-tomcat
leafpad /opt/tomcat/conf/tomcat-users.xml &>/dev/null
<tomcat-users>
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="admin-gui,manager-gui"/>
</tomcat-users>
leafpad /opt/tomcat/webapps/manager/META-INF/context.xml &>/dev/null
<!-- -->
leafpad /opt/tomcat/webapps/host-manager/META-INF/context.xml &>/dev/null
<!-- -->
nano /etc/nginx/conf.d/yourdomain.conf
server {
listen 80;
server_name www.yourdomain.com;
access_log /var/log/nginx/yourdomain.com_access.log;
error_log /var/log/nginx/yourdomain.com_error.log;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
rm /etc/nginx/sites-enabled/default
nginx -t ; echo "192.168.1.50 www.yourdomain.com" >> /etc/hosts ; systemctl restart nginx
cd /tmp && wget http://www.opencms.org/downloads/opencms/opencms-11.0.0.zip
unzip opencms-11.0.0
mv opencms.war /opt/tomcat/webapps/opencms.war ; chown tomcat:tomcat /opt/tomcat/webapps/opencms.war
systemctl restart apache-tomcat
http://www.yourdomain.com
http://www.yourdomain.com/opencms/setup
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment