1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
invoiceninja/docs/install.rst

82 lines
3.9 KiB
ReStructuredText
Raw Normal View History

2017-01-26 16:19:44 +01:00
Install
=======
Thanks for taking the time to setup Invoice Ninja.
.. Note:: The applications requires PHP >= 5.5.9 and MySQL.
Detailed Guides
^^^^^^^^^^^^^^^
- Ubuntu and Apache: `technerdservices.com <http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/>`_
- Debian and Nginx: `rosehosting.com <https://www.rosehosting.com/blog/install-invoice-ninja-on-a-debian-7-vps/>`_
- CentOS, Nginx, MariaDB and PHP 7: `thishosting.rocks <https://thishosting.rocks/how-to-install-invoice-ninja-on-centos/>`_
2017-01-26 16:19:44 +01:00
Automated Installers
^^^^^^^^^^^^^^^^^^^^
- Dockerfile (Free): `github.com/invoiceninja/dockerfiles <https://github.com/invoiceninja/dockerfiles>`_
- Softaculous ($30): `softaculous.com <https://www.softaculous.com/apps/ecommerce/Invoice_Ninja>`_
2017-02-26 08:12:32 +01:00
Steps to Install
^^^^^^^^^^^^^^^^
2017-01-26 16:19:44 +01:00
Step 1: Download the code
"""""""""""""""""""""""""
You can either download the zip file below or checkout the code from our GitHub repository. The zip includes all third party libraries whereas using GitHub requires you to use Composer to install the dependencies.
2017-03-23 12:35:46 +01:00
https://download.invoiceninja.com/ninja-v3.1.3.zip
2017-01-26 16:19:44 +01:00
2017-02-14 14:07:44 +01:00
.. Note:: All Pro and Enterprise features from our hosted app are included in both the zip file and the GitHub repository. We offer a $20 per year white-label license to remove our branding.
2017-01-26 16:37:35 +01:00
2017-01-26 16:19:44 +01:00
- Release Notes: `github.com/invoiceninja/invoiceninja/releases <https://github.com/invoiceninja/invoiceninja/releases>`_
- Roadmap: `trello.com/b/63BbiVVe/invoice-ninja <https://trello.com/b/63BbiVVe/invoice-ninja>`_
Step 2: Upload the code to your server
""""""""""""""""""""""""""""""""""""""
Copy the ZIP file to your server and then check that the storage folder has 755 permissions and is owned by the webserver user.
2017-01-26 16:37:35 +01:00
.. code-block:: shell
2017-01-26 16:19:44 +01:00
2017-01-26 16:37:35 +01:00
cd /path/to/ninja/code
chmod -R 755 storage
sudo chown -R www-data:www-data storage bootstrap public/logo
2017-01-26 16:19:44 +01:00
Step 3: Setup the database
""""""""""""""""""""""""""
Youll need to create a new database along with a user to access it. Most hosting companies provide an interface to handle this or you can run the SQL statements below.
2017-01-26 16:37:35 +01:00
.. code-block:: shell
2017-01-26 16:19:44 +01:00
2017-01-26 16:37:35 +01:00
CREATE DATABASE ninja;
CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja';
GRANT ALL PRIVILEGES ON * . * TO 'ninja'@'localhost';
2017-01-26 16:19:44 +01:00
Step 4: Configure the web server
""""""""""""""""""""""""""""""""
Please see these guides for detailed information on configuring Apache or Nginx.
Once you can access the site the initial setup screen will enable you to configure the database and email settings as well as create the initial admin user.
2017-03-23 12:45:04 +01:00
.. Tip:: To remove public/ from the URL map the webroot to the /public folder, alternatively you can uncomment ``RewriteRule ^(.*)$ public/$1 [L]`` in the .htaccess file.
2017-01-26 16:19:44 +01:00
Troubleshooting
^^^^^^^^^^^^^^^
2017-01-26 16:37:35 +01:00
- Check your webserver log (ie, /var/log/apache2/error.log) and the application logs (storage/logs/laravel-error.log) for more details or set ``APP_DEBUG=true`` in .env
2017-01-26 16:19:44 +01:00
- To resolve ``[Symfony\Component\Debug\Exception\FatalErrorException] Class 'SomeClass' not found`` try running php artisan optimize
- To resolve ``file_put_contents(...): failed to open stream: Permission denied`` run ``chmod -R 777 storage`` then ``chmod -R 755 storage``
2017-01-26 16:37:35 +01:00
- If index.php is in the URL it likely means that mod_rewrite needs to be enabled.
2017-01-26 16:19:44 +01:00
- Running ``composer install`` and ``composer dump-autoload`` can sometimes help with composer problems.
2017-01-26 19:08:48 +01:00
- If youre using a subdomain. ie, invoice.mycompany.com You will need to add ``RewriteBase /`` to public/.htaccess otherwise it may fail with ``Request exceeded the limit of 10 internal redirects due to probable configuration error.`` messages in the logs.
2017-01-26 16:19:44 +01:00
- Composer install error: ``Fatal error: Allowed memory size of...`` Try the following: ``php -d memory_limit=-1 /usr/local/bin/composer install``
2017-01-26 16:37:35 +01:00
- PHP Fatal error: ``Call to undefined method Illuminate\Support\Facades\Session::get()`` try deleting bootstrap/cache/services.php