Difference between revisions of "Tutorial: Local Host"
Tag: 2017 source edit |
|||
Line 11: | Line 11: | ||
<br /> | <br /> | ||
+ | '''Google doc version:''' https://docs.google.com/document/d/1K7_BAYfTg7ZQahxNMcILLyn5D5mIGnnKvqhYOm6iFKo/edit?usp=sharing | ||
==='''Install / Initial Setup'''=== | ==='''Install / Initial Setup'''=== | ||
Line 31: | Line 32: | ||
The following are required, but you can choose more if you wish | The following are required, but you can choose more if you wish | ||
− | [[File:Install.png|none|thumb| | + | [[File:Install.png|none|thumb|323.991x323.991px]] |
After this, complete the install as usual! | After this, complete the install as usual! | ||
One completed, Xampp should look similar to this | One completed, Xampp should look similar to this | ||
− | [[File:Console.png|none|thumb| | + | [[File:Console.png|none|thumb|387.983x387.983px]] |
(OPTIONAL) To make starting your server easier, consider enabling MySQL and Apache to start as soon as xampp is opened. You can do this by going into config<br /> | (OPTIONAL) To make starting your server easier, consider enabling MySQL and Apache to start as soon as xampp is opened. You can do this by going into config<br /> | ||
− | [[File:Image5.png|none|thumb| | + | [[File:Image5.png|none|thumb|381.989x381.989px]] |
And then selecting the following | And then selecting the following | ||
− | [[File:Image13.png|none|thumb| | + | [[File:Image13.png|none|thumb|325x325px]] |
Line 50: | Line 51: | ||
Composer can be downloaded [https://getcomposer.org/download/ here] ([https://getcomposer.org/Composer-Setup.exe Composer-Setup.exe]) | Composer can be downloaded [https://getcomposer.org/download/ here] ([https://getcomposer.org/Composer-Setup.exe Composer-Setup.exe]) | ||
− | [[File:Image12.png|none|thumb]] | + | [[File:Image12.png|none|thumb|221.989x221.989px]] |
I personally recommend installing for all users. | I personally recommend installing for all users. | ||
− | [[File:Image19.png|none|thumb| | + | [[File:Image19.png|none|thumb|422.997x422.997px]] |
[[File:Image7.png|none|thumb|418x418px]] | [[File:Image7.png|none|thumb|418x418px]] | ||
Line 61: | Line 62: | ||
[[File:Image6.png|none|thumb|437x437px]] | [[File:Image6.png|none|thumb|437x437px]] | ||
Once installed globally, open your local lorekeeper folder. | Once installed globally, open your local lorekeeper folder. | ||
− | [[File:Image14.png|none|thumb| | + | [[File:Image14.png|none|thumb|500x500px]] |
Copy the file directory | Copy the file directory | ||
− | [[File:Image17.png|none|thumb| | + | [[File:Image17.png|none|thumb|630x630px]] |
Open command prompt. You may need to run with administrator privileges. | Open command prompt. You may need to run with administrator privileges. | ||
Line 71: | Line 72: | ||
If typed correctly, the next line should read as your directory | If typed correctly, the next line should read as your directory | ||
− | [[File:Image11.png|none|thumb| | + | [[File:Image11.png|none|thumb|580x580px]] |
Type the following: | Type the following: | ||
Line 86: | Line 87: | ||
Create a new database | Create a new database | ||
[[File:Image16.png|none|thumb]] | [[File:Image16.png|none|thumb]] | ||
− | [[File:Image4.png|none|thumb | + | [[File:Image4.png|none|thumb]] |
Once made, add the name to your .env | Once made, add the name to your .env | ||
Line 110: | Line 111: | ||
Once this process has completed, open xampp and STOP your Apache service | Once this process has completed, open xampp and STOP your Apache service | ||
− | [[File:Image21.png|none|thumb| | + | [[File:Image21.png|none|thumb|540.994x540.994px]] |
Next, click config on the apache line, and '''select Apache(httpd.conf)''' . It will open a text document. | Next, click config on the apache line, and '''select Apache(httpd.conf)''' . It will open a text document. | ||
− | [[File:Image15.png|none|thumb]] | + | [[File:Image15.png|none|thumb|461.989x461.989px]] |
CTRL + F and search for “documentroot” | CTRL + F and search for “documentroot” | ||
− | [[File:Image20.png|none|thumb| | + | [[File:Image20.png|none|thumb|482.997x482.997px]] |
'''BY DEFAULT, YOUR DOCUMENT ROOT LINK WILL LEAD TO C:\Xampp OR SIMILAR''' | '''BY DEFAULT, YOUR DOCUMENT ROOT LINK WILL LEAD TO C:\Xampp OR SIMILAR''' | ||
Line 131: | Line 132: | ||
<br /> | <br /> | ||
− | === '''ENV Example''' === | + | ==='''ENV Example'''=== |
Copy paste this if you are unsure what should be in your .env | Copy paste this if you are unsure what should be in your .env | ||
Line 231: | Line 232: | ||
<br /> | <br /> | ||
− | === '''Common errors:''' === | + | ==='''Common errors:'''=== |
'''Error:''' Composer has ran out of memory | '''Error:''' Composer has ran out of memory | ||
Line 238: | Line 239: | ||
'''Error:''' Apache shutdown unexpectedly | '''Error:''' Apache shutdown unexpectedly | ||
− | * This error is usually caused by a mistyped / wrong document root | + | *This error is usually caused by a mistyped / wrong document root |
Revision as of 10:55, 5 November 2020
Contents
NOTE THAT THIS IS A WINDOWS BASED SETUP
I personally use a windows device, I have very limited knowledge of MacOS or Linux setup, however both should be very similar. I cannot provide help for bugs encountered on these Operating Systems outside of general google search.
Lorekeeper Setup Tutorial: http://lorekeeper-arpg.wikidot.com/wiki:tutorial:setting-up
This guide takes the approach that the reader has no or very little knowledge about xampp before beginning the guide. It may be more beneficial for more advanced users to skip towards the end of the guide, or read Draginraptor’s guide located here
This guide is also made under the assumption the user is already familiar with sourcetree and has a local copy of lorekeeper.
Google doc version: https://docs.google.com/document/d/1K7_BAYfTg7ZQahxNMcILLyn5D5mIGnnKvqhYOm6iFKo/edit?usp=sharing
Install / Initial Setup
- - -
To begin our tutorial, you’ll need the following:
- Xampp
The download link is located here
If you don’t already have PHP installed, Xampp comes with PHP 7.4 bundled in
If you see the following warning, just press ok, it shouldn’t impact anything lorekeeper related
When installing, you may receive multiple options on what to include
The following are required, but you can choose more if you wish
After this, complete the install as usual!
One completed, Xampp should look similar to this
(OPTIONAL) To make starting your server easier, consider enabling MySQL and Apache to start as soon as xampp is opened. You can do this by going into config
And then selecting the following
Click save and it should be done!
Lorekeeper Setup
Similarly to live servers, lorekeeper local requires a database and composer.
To start, we will install composer. To do this, you will need to install composer to your device
Composer can be downloaded here (Composer-Setup.exe)
I personally recommend installing for all users.
Do not select developer mode, and you can also skip the proxy URL.
Your install should look similar to this
Once installed globally, open your local lorekeeper folder.
Copy the file directory
Open command prompt. You may need to run with administrator privileges.
Type the following
cd <directory>
If typed correctly, the next line should read as your directory
Type the following:
composer install
It should start an install process
While composer installs, start up Apache and MySQL on your xampp control panel
Go to http://localhost/phpmyadmin
(note the link may be http://localhost:8080 if you have set your port to 80. If you haven’t or don’t know what port you’re using, localhost will work fine)
Create a new database
Once made, add the name to your .env
An example .env is included at the bottom of this tutorial.
Once done and composer has been install, run the following commands in command prompt, ensuring you are in your lorekeeper directory
Your env MUST be setup
php artisan key:generate
php artisan migrate
php artisan add-site-settings
php artisan add-text-pages
php artisan copy-default-images
php artisan setup-admin-user
You will have to manually authenticate your admin user and all subsequent users. You can do this in your database in the users table by adding a time to the ‘email_verified_at’ table and ‘alias’ table.
Once this process has completed, open xampp and STOP your Apache service
Next, click config on the apache line, and select Apache(httpd.conf) . It will open a text document.
CTRL + F and search for “documentroot”
BY DEFAULT, YOUR DOCUMENT ROOT LINK WILL LEAD TO C:\Xampp OR SIMILAR
Change both links to be your lorekeeper directory in your public folder
E.g, the directory you used for command prompt, but with \public appended to the end.
Once done, save, and start apache again
Go to http://localhost
(note the link may be http://localhost:8080 if you have set your port to 80. If you haven’t or don’t know what port you’re using, localhost will work fine)
If done successfully, you should have a local server!
ENV Example
Copy paste this if you are unsure what should be in your .env
The only variables you will need to change are your database name.
APP_NAME=Lorekeeper
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
CONTACT_ADDRESS=
DEVIANTART_ACCOUNT=
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=CHANGE TO YOUR DATABASE NAME, NO SPACES
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=
MAIL_HOST=
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
DEVIANTART_CLIENT_ID=
DEVIANTART_CLIENT_SECRET=
DEVIANTART_CALLBACK_URL=/
Common errors:
Error: Composer has ran out of memory
If this error occurs, you will need to find your php.ini file, and set the memory limit to -1
Error: Apache shutdown unexpectedly
- This error is usually caused by a mistyped / wrong document root