...
Code Block |
---|
# su - postgres
$ pg_dump liferay | bzip2 -c >liferay-sql.bz2
# su - liferay
$ cd liferay-portal-6.2-ce-ga2/
$ tar czvf liferay-data.tgz data/ |
...
Code Block |
---|
# adduser liferay
# su - liferay
$ wget http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.2.2%20GA3/liferay-portal-jboss-6.2-ce-ga3-20150103155803016.zip
...
$ unzip liferay-portal-jboss-6.2-ce-ga3-20150103155803016.zip
...
$ cd liferay-portal-6.2-ce-ga3/
$ tar xzvf /tmp/liferay-data.tgz
... |
Add a longer deploy timeout on slower servers:
Code Block | ||
---|---|---|
| ||
<deployment-scanner deployment-timeout="360" path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/> |
Restore the content of the data directory:
Code Block |
---|
$ cd liferay-portal-6.2-ce-ga3/
$ tar xzvf /tmp/liferay-data.tgz
... |
Restore the database content:
Code Block |
---|
# su - postgres $ createuser liferay -P $ createdb -O liferay -E UTF-8 liferay $ bzip2 -dc /tmp/liferay-sql.bz2 >liferay.sql $ psql liferay liferay=# \i liferay.sql ... |
Add custom configuration because of the HTTPS:
Code Block | ||
---|---|---|
| ||
web.server.protocol=https web.server.http.port=80 web.server.https.port=443 |
Start the instance:
Code Block |
---|
$ screen $ liferay-portal-6.2-ce-ga3/jboss-7.1.1/bin/standalone.sh ... |
...navigate to the internet address of the portal and configure the database.
Install and configure the Apache HTTPD
Install the httpd package:
...
Configure the SSL:
Code Block | ||
---|---|---|
| ||
Listen *:443
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/conf.d/portal.gacivs.info.pem
SSLCertificateKeyFile /etc/httpd/conf.d/portal.gacivs.info.key
SSLCertificateChainFile /etc/httpd/conf.d/portal.gacivs.info.ca-bundle |
Configure virtual hosts:
Code Block |
---|
<VirtualHost _default_:80>
<Proxy balancer://gacivs>
Order deny,allow
Allow from all
BalancerMember http://localhost:8080 route=portal.gacivs.info
ProxySet stickysession=ROUTEID
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from all
AuthType Basic
AuthName "Restricted Files"
AuthBasicProvider file
AuthUserFile /etc/httpd/conf.d/passwords
Require user admin
</Location>
ProxyPass /balancer-manager !
ProxyPass /server-status !
RewriteEngine On
RewriteRule ^/(.*) https://portal.gacivs.info/$1 [L,R]
ProxyPreserveHost On
ProxyPass / balancer://gacivs/
ProxyPassReverse / balancer://gacivs/
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
</VirtualHost>
<VirtualHost _default_:443>
<Proxy balancer://gacivs>
Order deny,allow
Allow from all
BalancerMember http://localhost:8080 route=portal.gacivs.info
ProxySet stickysession=ROUTEID
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from all
AuthType Basic
AuthName "Restricted Files"
AuthBasicProvider file
AuthUserFile /etc/httpd/conf.d/passwords
Require user admin
</Location>
ProxyPass /balancer-manager !
ProxyPass /server-status !
SSLEngine on
ProxyPreserveHost On
ProxyPass / balancer://gacivs/
ProxyPassReverse / balancer://gacivs/
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
</VirtualHost> |
Set up the portal
Navigate to the public URL and set the database and the other data...