Instalar Postgres, Postgis, Mysql, Phpmyadmin en CentOS 7
Instalar Postgres, Postgis, Mysql, Phpmyadmin en CentOS 7
Instalar postgis
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-78.noarch.rpm
yum install postgis2_94
Instalar JAVA
for 32-bit (x86) systems:
## yum install /opt/jdk-8-linux-i586.rpm
CONFIGURAR JAVA
configure the JAVA package using the alternatives command:
JDK_DIRS=($(ls -d /usr/java/jdk*))
JDK_VER=${JDK_DIRS[@]:(-1)}
VERIFICAR JAVA
You may want to check if JAVA has been properly setup on your CentOS
Linux VPS using:
java -version
SETUP TOMCAT
TOMCAT USER
Before proceeding with the Tomcat installation, lets first create a
separate system user which will run the Tomcat server:
useradd -r tomcat8 --shell /bin/false
DOWNLOAD TOMCAT
Next, download the latest version of Tomcat 8 available
at http://tomcat.apache.org/download-80.cgi . You can use wget to
download it in /tmp, for example:
Instalar Tomcat
Extract the contents of the Tomcat archive you just downloaded to /opt,
create a symbolic link of tomcat directory to /opt/tomcat-latest and setup
proper ownership using the following commands:
tar -zxf /tmp/apache-tomcat-8.0.22.tar.gz -C /opt
ln -s /opt/apache-tomcat-8.0.22 /opt/tomcat-latest
chown -hR tomcat8: /opt/tomcat-latest /opt/apache-tomcat-8.0.22
START TOMCAT
Create the following systemd unit file
in /etc/systemd/system/tomcat8.service
[Unit]
Description=Tomcat8
After=network.target
[Service]
Type=forking
User=tomcat8
Group=tomcat8
Environment=CATALINA_PID=/opt/tomcat-latest/tomcat8.pid
Environment=TOMCAT_JAVA_HOME=/usr/java/default
Environment=CATALINA_HOME=/opt/tomcat-latest
Environment=CATALINA_BASE=/opt/tomcat-latest
Environment=CATALINA_OPTS=
Environment="JAVA_OPTS=-Dfile.encoding=UTF-8
-Dnet.sf.ehcache.skipUpdateCheck=true -XX:+UseConcMarkSweepGC -XX:
+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:MaxPermSize=128m -Xms512m
-Xmx512m"
ExecStart=/opt/tomcat-latest/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID
[Install]
WantedBy=multi-user.target
With the unit file in place, run the following commands to start the
Tomcat servce:
systemctl daemon-reload
systemctl restart tomcat
systemctl enable tomcat
NOTA IMPORTANTE: al momento de ingresar proyectos web es necesario cambiar el
nombre de usuario a todo el directorio y sus archivos, caso contrario tendr
inconvenientes al momento de guardar informacin en ese directorio.
chown -hR tomcat8:tomcat8 directory
instalar phpmyadmin
configurar
vim /etc/httpd/conf.d/phpMyAdmin.conf
Require ip 127.0.0.1
Allow from 127.0.0.1
Require ip 127.0.0.1
Allow from 127.0.0.1
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
Replace with
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
</RequireAny>
Instalar GDAL