sudo apt-get install lamp-server^
mysql -u root -p
CREATE DATABASE dbjoomla;
CREATE USER joomlauser;
(Change <password> to the password of your choice)
SET PASSWORD FOR joomlauser = PASSWORD("<password>");GRANT ALL PRIVILEGES ON dbjoomla.* TO joomlauser@localhost IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;
exit
wget http://joomlacode.org/gf/download/frsrelease/17965/78414/Joomla_3.0.3-Stable-Full_Package.zip
sudo unzip -q Joomla_3.0.1-Stable-Full_Package.zip -d /var/www
You will want to remove the index.html that exists in /var/www by default
sudo chown -R www-data.www-data /var/www
Install joomla 3.0 from a browser by typing http://[hostname]
Labels
- Active Directory (1)
- Eclipse (1)
- GIT (1)
- Glassfish (1)
- Java (3)
- Javascript (1)
- Joomla (1)
- Linux (12)
- MySQL (1)
- Proxmox (3)
- Sonicwall (1)
- SSH (1)
- Ubuntu (9)
- Version Control (1)
- Windows (1)
Wednesday, April 10, 2013
Ubuntu 12.04 Joomla 3
I recently setup an Ubuntu server with Joomla 3. I used the instructions found here with a few modifications. I did not want the joomla site to be under the /joomla subdirectory so I skipped the first three commands under step 2. The steps I used are as follows:
Wednesday, February 13, 2013
Locale error
August 8, 2012
I had been getting an error on some Ubuntu servers when using apt:
locale: Cannot set LC_CTYPE to default locale: No such file or directorylocale: Cannot set LC_MESSAGES to default locale: No such file or directorylocale: Cannot set LC_ALL to default locale: No such file or directory
After some googling I found a solution:
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
EDIT: This occurs when I setup Ubuntu 12.04 servers using an openvz image that I downloaded (I don't remember from where).
Thursday, June 14, 2012
Expand Proxmox VM
These are the steps I took to expand the hard drive of a Windows 2003 server running on Proxmox
I found these steps here.
- Shutdown server
- Create backup
- Expand disk in my case it was to 60GB which is 64424509440 bytes which you divide by the bit size for the "seek" option (125829120):
- Restart pvedaemon:
- Add GParted live CD to virtual CD drive and boot server
- Resize NTFS partition with GParted interface
- Reboot server (Windows will run a constistency check because of the new disk size)
~# cd /var/lib/vz/images/101
~# dd if=/dev/zero of=vm-101-disk-1.raw bs=512 count=0 seek=125829120
~# /etc/init.d/pvedaemon restart
Wednesday, March 7, 2012
Glassfish 3.1.2 on Ubuntu 11.10
These are the steps I took to install Glassfish 3.1.2 on Ubuntu 11.10.
I should point out that I used a Proxmox KVM virtual server for this. I first tried an OpenVZ virtual server but kept running into an error: "There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server." After some googling I decided this error had something to do with the networking which is significantly different on OpenVZ than KVM so I abandoned the OpenVZ container and created a KVM virtual host.
These steps are a combination of two other guides in order to provide an internal Glassfish server that is password protected (here and here).
Before I began I installed Ubuntu 11.10 server (64-bit) on the Proxmox KVM virtual machine and updated to the latest available updates then backed-up the virtual machine.
I should point out that I used a Proxmox KVM virtual server for this. I first tried an OpenVZ virtual server but kept running into an error: "There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server." After some googling I decided this error had something to do with the networking which is significantly different on OpenVZ than KVM so I abandoned the OpenVZ container and created a KVM virtual host.
These steps are a combination of two other guides in order to provide an internal Glassfish server that is password protected (here and here).
Before I began I installed Ubuntu 11.10 server (64-bit) on the Proxmox KVM virtual machine and updated to the latest available updates then backed-up the virtual machine.
- Install Java (I chose the natively available version of Java, openjdk):
- Install the unzip utility (not included by default in Ubuntu 11.10):
- Create user and group to install and run Glassfish (I chose glassfish and glassfishadm):
- Change to glassfish user:
- Get Glassfish zip:
- Unzip glassfish and move it to root of glassfish user home folder:
- Change owner and group of entire folder:
- Exit glassfish user:
- Create script to start and stop Glassfish server at /etc/init.d/glassfish. This script will use the glassfish user to start and stop the Glassfish instance so that it does not run as root:
- Set script to run at boot:
- Set admin password (default password for admin is blank):
- Set security on Glassfish:
- Start the server:
~# sudo apt-get install openjdk-7-jdk
~# sudo apt-get install unzip
~# sudo adduser --home /home/glassfish --system --shell /bin/bash glassfish
~# sudo groupadd glassfishadm
~# sudo usermod -a -G glassfishadm glassfish
~# sudo su - glassfish
~# wget http://download.java.net/glassfish/3.1.1/release/glassfish-3.1.1.zip
~# unzip glassfish-3.1.2.zip
~# mv glassfish3/* .
~# rm -r glassfish3
~# rm glassfish-3.1.2.zip
~# chown -R glassfish *
~# chgrp -R glassfishadm *
~# exit
#!/bin/bash
case "$1" in
start)
su - glassfish -c "/home/glassfish/bin/asadmin start-domain domain1"
;;
stop)
su - glassfish -c "/home/glassfish/bin/asadmin stop-domain domain1"
;;
restart)
su - glassfish -c "/home/glassfish/bin/asadmin stop-domain domain1"
su - glassfish -c "/home/glassfish/bin/asadmin start-domain domain1"
;;
*)
echo "usage: $0 {start|stop|restart}"
;;
esac
exit 0
~# sudo chmod u+x /etc/init.d/glassfish
~# sudo update-rc.d glassfish defaults
~# sudo su - glassfish -c "/home/glassfish/bin/asadmin --user admin change-admin-password"
Enter admin password> _
Enter new admin password>
Enter new admin password again>
Command change-admin-password executed successfully.
~# sudo su - glassfish -c "/home/glassfish/bin/asadmin enable-secure-admin"
~# sudo /etc/init.d/glassfish start
Friday, January 13, 2012
Redmine on Ubuntu 11.04 using MySQL
I decided to give Redmine a try and ran into a few issues using most of the guides out there to get it installed. The guide that worked is below but be sure to install your mysql server (sudo apt-get install mysql-server) first.
http://foxfoo.com/howto-install-redmine-on-ubuntu-1104.html
http://foxfoo.com/howto-install-redmine-on-ubuntu-1104.html
Monday, October 24, 2011
Resizing with LVM
I am running a proxmox server with several virtual machines and noticed that I have more disk space configured on the virtual machines then I have on the partition they are running on. Here are the steps I took to increase the size of the ext3 partition hosting the vms.
- View the mount points to determine what logical volume the vms are on
- View the logical volume to determine what volume group it is on:
- View the volume group to be sure there is room for expansion:
- Extend the logical volume (-L flag as used below allows you to specify the new size of the volume):
- Resize the ext3 partition
~# mount
/dev/pve/root on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/mapper/pve-data on /var/lib/vz type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
~# lvdisplay /dev/mapper/pve-data
--- Logical volume ---
LV Name /dev/pve/data
VG Name pve
~# vgdisplay pve
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2236
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 477.93 GB
PE Size 4.00 MB
Total PE 122351
Alloc PE / Size 44928 / 175.50 GB
Free PE / Size 77423 / 302.43 GB
VG UUID ThGaW0-KPoF-ZA3V-jgxE-zv6d-jaMY-Pc8Y1W
~# lvextend -L150G /dev/pve/data
Extending logical volume root to 150.00 GB
Logical volume root successfully resized
~# resize2fs /dev/pve/data
resize2fs 1.41.3 (12-Oct-2008)
Filesystem at /dev/pve/data is mounted on /var/lib/vz; on-line resizing required
old desc_blocks = 4, new_desc_blocks = 10
Performing an on-line resize of /dev/pve/data to 39321600 (4k) blocks.
The filesystem on /dev/pve/data is now 39321600 blocks long.
Monday, January 10, 2011
Create copy of VM on Proxmox
- Ssh into the Proxmox server as root.
- Run "vzdump" with desired VMID.
- Run "qmrestore" with unused VMID. Your dump file should be located in /var/lib/vz/dump.
$vzdump 101
$qmrestore /var/lib/vz/dump/vzdump-qemu-101-2011_01_10-11_13_30.tar 102
I tested this with a Ubuntu server 10.10 VM. From the Proxmox console I deleted the network device and recreated it to be sure it had a unique MAC address (not sure if that was necessary). I started the new VM, logged in, and changed the hostname and some values for the apache server.
**UPDATE (02/09/2011)**
I noticed that when running the this command I would see:
**UPDATE (02/09/2011)**
I noticed that when running the this command I would see:
INFO: mode failure - unable to dump into snapshot (use option --dumpdir)After some intrepid googling I discovered this was because the dump was being created on the same lvm group vzdump had to suspend the vm to do the backup. To avoid this (since I was backing up a live webserver) I mounted a windows share (on a domain) and pointed the dump to there.
- Mount the windows share to the /mnt/share directory (be sure that directory exists)
- Run vzdump with the --dumpdir option
$mount -t smbfs //server/share /mnt/share -o username=domainuser
$vzdump --dumpdir /mnt/share/dumps 101
Subscribe to:
Posts (Atom)