Server4You: Difference between revisions

From Wiki RB4
Line 16: Line 16:
* JAVA_HOME variable set to /usr/lib/jvm/jdk1.7.0 in /etc/environment
* JAVA_HOME variable set to /usr/lib/jvm/jdk1.7.0 in /etc/environment
* apt-get install unzip
* apt-get install unzip
===JBoss===
===[[JBoss|JBoss]]===
* JBoss by copying local Zip-file of EAP 6.1 to server to /usr/local/share/jboss/jboss-eap-6.1/bin and install according chapter 3.2.2 in https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/pdf/Installation_Guide/JBoss_Enterprise_Application_Platform-6.1-Installation_Guide-en-US.pdf
* JBoss by copying local Zip-file of EAP 6.1 to server to /usr/local/share/jboss/jboss-eap-6.1/bin and install according chapter 3.2.2 in https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/pdf/Installation_Guide/JBoss_Enterprise_Application_Platform-6.1-Installation_Guide-en-US.pdf
* add administration user by /usr/local/share/jboss/jboss-eap-6.1/bin/add-user.sh with user UweHeuer and password Halloo0@1 according https://www.digitalocean.com/community/articles/how-to-install-jboss-on-ubuntu-12-10-64bit, server can be started and stopped by  
* add administration user by /usr/local/share/jboss/jboss-eap-6.1/bin/add-user.sh with user UweHeuer and password Halloo0@1 according https://www.digitalocean.com/community/articles/how-to-install-jboss-on-ubuntu-12-10-64bit, server can be started and stopped by  
Line 28: Line 28:
* use [http://80.86.91.46:9990/console Web console -> Profile (not Runtime)] and add datasource ''MySQLDS'' with JNDI name ''java:jboss/datasources/MySQLDS'' and ''UwesWikiDS'' with JNDI name ''java:jboss/datasources/UwesWikiDS'', select the MySQL Driver above, enter connection info user 'root' and pwd 'Halloo0@1' => configuration is saved in standalone configuration  file <JBOSS_HOME>\standalone\configuration\standalone.xml
* use [http://80.86.91.46:9990/console Web console -> Profile (not Runtime)] and add datasource ''MySQLDS'' with JNDI name ''java:jboss/datasources/MySQLDS'' and ''UwesWikiDS'' with JNDI name ''java:jboss/datasources/UwesWikiDS'', select the MySQL Driver above, enter connection info user 'root' and pwd 'Halloo0@1' => configuration is saved in standalone configuration  file <JBOSS_HOME>\standalone\configuration\standalone.xml
* chmod +x /etc/rc.d/init.d/jbossas7
* chmod +x /etc/rc.d/init.d/jbossas7
===PHPMyAdmin===
===PHPMyAdmin===
* set password for mysql user root@localhost according to http://www.unixmen.com/howto-install-amp-and-phpmyadmin-on-ubuntu/
* set password for mysql user root@localhost according to http://www.unixmen.com/howto-install-amp-and-phpmyadmin-on-ubuntu/

Revision as of 11:01, 15 September 2014

General Data

  • Ubuntu 10.04.3 LTS (see file /etc/issue)
  • root Halloo0@1
  • reboot

Operation

  • Login with C:\Uwes\Programme\WinSCP\WinSCP.exe
  • Reboot with
reboot

Installation

  • apt-get install proftpd (but not used yet)

Java

  • java /usr/lib/jvm/jdk1.7.0
  • JAVA_HOME variable set to /usr/lib/jvm/jdk1.7.0 in /etc/environment
  • apt-get install unzip

JBoss

./standalone.sh -Djboss.bind.address=80.86.91.46 -Djboss.bind.address.management=80.86.91.46 &
./jboss-cli.sh --connect --controller=80.86.91.46:9999 command=:shutdown
  • add ajp to connect to http proxy for uweheuer and jboss console
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" enabled="true"/>
  • create MyUbuntuService.sh in HP Laptop JBoss bin directory as Unix file, copy to /usr/local/share/jboss/jboss-eap-6.1/bin and copy it to /etc/init.d/jbossas7 and
update-rc.d jbossas7 defaults
  • copy mysql-connector-java-5.1.27-bin.jar to <JBOSS_HOME>\standalone\deployments or using deployment via Web console and enable it (e.g. on HomePC New)
  • use Web console -> Profile (not Runtime) and add datasource MySQLDS with JNDI name java:jboss/datasources/MySQLDS and UwesWikiDS with JNDI name java:jboss/datasources/UwesWikiDS, select the MySQL Driver above, enter connection info user 'root' and pwd 'Halloo0@1' => configuration is saved in standalone configuration file <JBOSS_HOME>\standalone\configuration\standalone.xml
  • chmod +x /etc/rc.d/init.d/jbossas7

PHPMyAdmin

SET PASSWORD FOR 'root@localhost' = PASSWORD('Halloo0@1');

Apache

  • added to /etc/apache2/sites-enabled/000-default proxy configuration to JBoss for uweheuer application
  • sudo a2enmod proxy_ajp (creates /etc/apache2/mods-enabled/proxy.conf und proxy_ajp.conf)
  • cp /mods-enabled/proxy.conf as backup to proxy.conf.bak
  • edit proxy.conf (Deny from all to Allow from all)
  • cp /sites-enabled/000-default to 000-default.bak as backup
  • edit 000-default (add ProxyPass und ProxyReversePass)
  • restart apache with sudo /etc/init.d/apache2 restart

MySQL

  • change /etc/mysql/my.conf bind-address to 0.0.0.0 to make mysql listen on all available IPs to enable remote access
  • add user 'root' with host '%' and password 'Halloo0@1' to enable remote access
  • /etc/init.d/mysql restart

UweHeuer

  • export local DB mysql505 as SQL, create DB mysql505 on vserver, import export-file
  • sudo apt-get install mediawiki (according to https://help.ubuntu.com/community/MediaWiki)
  • edit /etc/mediawiki/apache.conf
  • restart apache with sudo /etc/init.d/apache2 restart
  • set in /etc/php5/apache2/php.ini and restart apache
safe_mode = Off
Name=UwesWiki
Sysadmin-User=UweHeuer
pwd=halloo
DBName=mediawiki
DBUser=root
DBPwd=Halloo0@1
  • and
sudo cp /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
  • add to LocalSettings.php
# Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;
# Disabling editing by everyone
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['sysop']['edit'] = false;
  • export local mediawiki DB by
C:\Uwes\Programme\xampp\mysql\bin>mysqldump --add-drop-table --user=root mediawiki >c:\temp\mediawiki.sql
  • copy file to vserver via WinSCP,
  • import export-file by
mysql --user=root --password=Halloo0@1
use mediawiki;
source /tmp/mediawiki.sql;