Sign in to follow this  
plokami666

LAMP+Solder Installation.

Recommended Posts

Edit February 8 2014:

 

###Notice###

 

Dear fellow user who is about to read this guide, please note the following:

In it's current state, it is a little outdated and you might have to tinker around with solder a little yourself to get it working.

Please make sure to read through the replies to this thread for some helpful information.

When I find some time, I will set up a vagrant VM for testing and update this guide.

 

###End of Notice###

 

This is a mostly noob-friendly LAMP + Solder installation tutorial.
This guide assumes you're either on a dedicated server or a VPS that's running Ubuntu 12.04.
It also assumes that you know what linux is and that you at least know what Ubuntu is.
If you don't, this guide is not for you.
The process should generally be the same for servers running Debian (although untested) and I'm sure it can easily be adjusted for CentOS but I'm not going to bother with that.
And to avoid the potential "omgwthbbq", this guide is NOT for windows servers.

Step 1: Connect to your server
If on linux or mac, open up a terminal and type

ssh [email protected]
If you're on windows, download and run putty, kitty or any ssh alternative you feel like using, fill in the info on the GUI and connect.
In all cases, it will tell you that the authenticity of the server could not be verified. Accept anyway.
It will prompt you for your password. A common issue many users encounter is that nothing is showing up when they are trying to type the password. That's intended. Just type your password as normal and press enter.

Step 2: Installing and configuring LAMP
Apache2:
sudo apt-get update
sudo apt-get install apache2

PHP and Solder PHP requirements:
sudo apt-get install php5 libapache2-mod-php5 php5-curl php5-mcrypt

sudo /etc/init.d/apache2 restart

MySQL:

sudo apt-get install mysql-server

A screen will come up asking you to set up a password for the root user of MySQL.
Just set up whatever you want but make sure you remember it.

sudo apt-get install nano
sudo nano /etc/mysql/my.cnf

Locate this line
bind-address = 127.0.0.1
Change the IP from 127.0.0.1 to whatever IP your host provided you with.
ctrl+o to save (don't rename it)
ctrl+x to exit

Make php work with MySQL:
sudo apt-get install libapache2-mod-auth-mysql php5-mysql
Next
sudo nano /etc/php5/apache2/php.ini
Find this line
;extension=mysql.so
And remove the semicolon (uncomment it) so it looks like this
extension=mysql.so
Again, ctrl+o to save and ctrl+x to exit.
Restart Apache2 to apply all changes and get everything working.
sudo /etc/init.d/apache2 restart

Step 3: Installing Webmin, uploading Solder and making everything work.

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

wget https://downloads.sourceforge.net/project/webadmin/webmin/1.630/webmin_1.630_all.deb

sudo dpkg -i webmin_1.630_all.deb

Now we have webmin installed but we're not going to be touching it yet.
Download and install an FTP client on your computer. Filezilla will do fine.
Connect via sFTP with the same log-in information you used to connect to the ssh console to the server so you can view the files.
Go to /var/www .
Upload all solder files there.
Enter the folder named public and create a new directory named mods.
This is where your mods are going to be uploaded. This is your mod repository.
Go back up and enter the application directory then the config directory.
Right click on solder.php and click edit.
Change
'repo_location' => '',
Into this
'repo_location' => '/var/www/public/mods/',

Then change
'mirror_url' => '',
Into this
'mirror_url' => 'http://the_ip_adress_provided_or_your_url_mask/mods/',
For the moment, the line above is incorrect. We will fix that soon though.

Next change
'platform_key' => '',
into
'platform_key' => 'your_solder_api_key',

DO NOT TOUCH THIS LINE
'minecraft_api' => 'http://www.technicpack.net/api/minecraft',

Save your changes, exit the document and tab back to Filezilla. There will be a window asking you if you want to upload your changes. Press yes.

We're almost there now.
In your web browser, open a new tab and go to https://your_server_ip_adress:10000
Your browser will warn you that the connection is unsafe.
It lies, so just click on "I understand the risks"
Log in as root with the root password provided by your hosting company.

In the menu to the left, click on Servers then on MySQL Database Server
Find the link that reads "Create new Database" on the page that just opened.
It's close to the top-middle.
Enter database name as solder then click on create.

On the left side, under servers click on Apache Webserver.
Click on the virtual webserver.
Near the bottom, there should be a field named "document root"
Change it from this
/var/www/
to this
/var/www/public/
Then click on save.
On the upper right corner, click on save changes.

Tab back to Filezilla, right click on database.php and click on edit.
Locate the following:


'mysql' => array(
'driver' => 'mysql',
'host' => '127.0.0.1',
'database' => '',
'username' => '',
'password' => '',
'charset' => 'utf8',
'prefix' => '',
),


And change it into


'mysql' => array(
'driver' => 'mysql',
'host' => '127.0.0.1',
'database' => 'solder',
'username' => 'root',
'password' => 'your_mysql_password',
'charset' => 'utf8',
'prefix' => 'solder',
),
Save the document and exit. Tab back to Filezilla and there will once again be a window asking you if you wish to upload your changes. Press yes.


The above makes it so that solder knows where and how to create the databases.
You can create your own mysql user with it's own password and whatever rights you want to give it but I'm not going to go into that. If you want to go that way, google is your friend.

Next we want to give the correct permissions to our files so that everything can run.
Still in Filezilla, right click the www folder (the one that contains application, public and so on) and click on File Attributes. Change the numeric value to 775 and tick the box that reads Recurse Into Subdirectories. This will take a while so go grab a coffee.

Back to the SSH terminal:

Type the following
cd /var/www
Then
php artisan migrate:install
php artisan migrate

That's it. You're done. Solder is installed and running.
In a new tab on your web browser navigate to the ip adress provided by your host or to whatever URL mask you have created for it and you will be greeted by a pretty log-in window.

Log in with [email protected] and password admin.
Click on Manage Users and edit your user to match whatever log in you want to have.

Little update since we just encountered this issue.
When your profile in technic asks you for the solder api, you need to enter it like this
http://your_ip_or_url_here/index.php/api/ Edited by plokami666

Share this post


Link to post
Share on other sites

For my Solder to work i had to skip the configuration of the "/etc/php5/apache2/php.ini" file and at the linking process i had to enter my address without a leading "http://".

Share this post


Link to post
Share on other sites

Hey, very nice guide :)

Im geting stuck on the last part "php artisan migrate:install" I get this error.

PHP Fatal error: Class 'Autoloader' not found in /var/www/application/start.php on line 61

Edit: Third time's the charm :D Got it working by following sircrimer's comment

Share this post


Link to post
Share on other sites

Create a folder for where the .jar is gona go. Like for mods, put the .jar in a folder called mods and pack it in a .zip archive and same for coremods, in a folder called coremods:)

This includes also for those mods that are already in a archive, found that out when i first tested that stuff got unpacked in the packs folder instead of mods and coremods folder and so on.

Share this post


Link to post
Share on other sites

These instruction do not include a link to solder or mention that solders Github has additional instructions that need to be followed in order to install solder. Specifically "Next, copy application/config-sample to application/config and public/.htaccess-sample to public/.htaccess."

link

https://github.com/TechnicPack/TechnicSolder

It should be noted that it seems that the dev 0.3 branch this line

'repo_location' => '/var/www/public/mods/'

will make your directory structure

/var/www/public/mods/mods/[modslug]/

Note the TWO /mods

Share this post


Link to post
Share on other sites

hi

it seems i require assistance

EDIT: this problem is solved. I created the database trough the command line instead. But now a new problem arises.

"you see, the server im using is hosted by vps.me using the free version. It gives 2 IP's (IPv4 and IPv6).

Vps.me is making that the ipv4 for the free version is only used for ssh and nothing else. For that we must use the ipv6.

Now the problem is that my internet provider does not support ipv6 yet so when i tryed to acess the https://2a02:4780:1:1::1:36c:10000 or https://[2a02:4780:1:1::1:36c]:10000 (btw thats my ip) it says "this webpage is not avaiable" so i cannot connect to mysql database server. Everything was just fine until here.

EDIT: New problem:

when i try the "php artisan migrate:install" or "php artisan migrate" it says Can't connect to MySQL server error (111).

After some googling i found out that "It probably means that your MySQL server is only listening the localhost interface.". So what should i do to fix this? Its almost done

Share this post


Link to post
Share on other sites

I have absolutely zero experience with ipv6 so I'm afraid I can't help you there.

About the database, edit your user to only send/listen to localhost as well.

PS: You get what you pay for. I would suggest dropping vps.me and getting a real provider. There's plenty of cheap ones out there.

For Solder itself I use minivps.co.uk with an external repository provided by a friend.

Share this post


Link to post
Share on other sites

I would suggest registering on koding.com for your tests.

They provide you a VM that will be online for as long as you're working with it and for a while after you stop.

You can install whatever you want on it and they also provide you with a url along the lines of <username>.kd.io .

First VM is free.

Share this post


Link to post
Share on other sites

You'd have to export the db and import it in the new host.

About the config settings, you'd have to change anything that's been altered on the new host.

i like that idea, better try with a real host, so many people running solder means, its working on properly configured hosts

Indeed it is. My Days of Yore modpack is being served by Solder without any issue whatsoever.

Share this post


Link to post
Share on other sites

btw when was the last time the tecnhic dev team sayd anything about solder api? i know what is posted on the dashboard of the platform but nothing very specific. is there any place we can follow their progress? (besides github)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this