What's the fastest way to install and set up TYPO3 locally? - typo3

I want to install and set up TYPO3 on my local machine. What's the best practice and fastest way to do so?

For running TYPO3 on a local machine you need a web server running on your machine.
This can be done in different ways:
Native Web Server, PHP and database on a Linux based machine
Virtual Machine (VirtualBox, VMWare, Parallels, etc.)
Vagrant
Docker
Currently the fastest way to a "non power user" in my opinion is ddev.
ddev is a user-friendly possibility to run a perfect environment for TYPO3 on a docker base. It runs on Linux, Mac and Windows (minimum version 10, hyper-v recommended) and it brings all technologies you need for best experience.
Install Docker and ddev, see https://ddev.readthedocs.io/en/stable/
Create a folder for your installation, e.g. ~/Websites/my-website/ or C:\Websites\my-website\ and go into it.
Run ddev config and set these three options in the dialog:
Project name (default is your folder name): Whatever you like
Docroot location: public and say yes for creating
Project type: typo3
Run ddev start to start the Docker containers and add your root password to set the hosts entry (for accessing it via local domain)
Run ddev composer create typo3/cms-base-distribution ^9 and say yes for overwriting
Run ddev config again and just hit enter for every dialog to create a file which provides the DB credentials for your TYPO3 installation
Run ddev exec vendor/bin/typo3cms install:setup --no-interaction --admin-user-name=admin --admin-password=password --site-setup-type=site
That's all, you have a running TYPO3 instance on your local machine.
You can access it by using <project-name>.ddev.site in your browser, in our example it should be http://my-website.ddev.site. To get into the TYPO3 backend you only need to put the credentials admin:password on http://my-website.ddev.site/typo3.
For troubleshooting go to:
https://ddev.readthedocs.io/en/stable/users/troubleshooting/
https://docs.typo3.org/typo3cms/InstallationGuide/Troubleshooting/Index.html
https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/SettingUpTypo3Ddev.html

Related

Why can't delete MYSQL folder in program file (Local Disc C)

I want to uninstall MYSQL workbench in my PC.after uninstall & while deleting MYSQL, it shows the action cant be completed because of the folder or a file in it is open in another program,Close the folder or file and try again .
I always try to delete folder but I couldnt.
You can't delete the folder because mysql service is using it.
Mysql workbench, by default installs mysql as a service, which is the recommended way to run mysql.
On Windows, the recommended way to run MySQL is to install it as a Windows service, so that MySQL starts and stops automatically when Windows starts and stops. A MySQL server installed as a service can also be controlled from the command line using NET commands, or with the graphical Services utility. Generally, to install MySQL as a Windows service you should be logged in using an account that has administrator rights.
From dev.mysql
On Windows, if you have used an installer to install something, you should uninstall it from Add Remove Programs.
Not only will its installer stop the service, and remove all files but also tidy up registry entries.

Which folder or files created in vagrant should not be push in a repository on GitHub

I would like to create a vagrant with some utilities installed, such like a configured LAMP, npm installed, etc... and later doing a push in a public github account.
I should create a .gitignore file with which restrictions? A simple vagrant project have this structure:
.vagrant (folder).
html (folder).
vagrantfile (file).
And I don't want some script shell for install the utilities when the user run vagrant up. For that I want to share an environment with everything and installed via vagrant ssh.
You definitely want your Vagrantfile. That's what defines your Vagrant environment. And you almost certainly want to ignore .vagrant/.
gitignore.io seems to agree:
# Created by https://www.gitignore.io/api/vagrant
### Vagrant ###
.vagrant/
You might also want to use this utility with the rest of your stack, e.g. here is a .gitignore generated for Composer, NodeJS and Vagrant.

Trouble understanding python virtual enviornment

I have created a python virtual enviornment to runn an applicaton using these instructions:
git clone http://github.com/MediaCrush/MediaCrush && cd MediaCrush
Create a virtual environment
Note: you'll need to use Python 2. If Python 3 is your default python interpreter (python --version), add --python=python2 to the virtualenv command.
virtualenv . --no-site-packages
Activate the virtualenv
source bin/activate
Install pip requirements
pip install -r requirements.txt
Install coffeescript
npm install -g coffee-script
Configure MediaCrush
cp config.ini.sample config.ini
Review config.ini and change any details you like. The default place to store uploaded files is ./storage, which you'll need to create (mkdir storage) and set the storage_folder variable in the config to an absolute path to this folder.
Compile static files
If you make a change to any of the scripts, you will need to run the compile_static.py script.
python compile_static.py
Start the services
You'll want to make sure Redis is running at this point. It's probably best to set it up to run when you boot up the server (systemctl enable redis.service on Arch).
MediaCrush requires the daemon and the website to be running concurently to work correctly. The website is app.py, and the daemon is celery. The daemon is responsible for handling media processing. Run the daemon, then the website:
celery worker -A mediacrush -Q celery,priority
python app.py
This runs the site in debug mode. If you want to run this on a production server, you'll probably want to run it with gunicorn, and probably behind an nginx proxy like we do.
gunicorn -w 4 app:app
I am trying to set this up on a remote server which is hosting 2 other websites.
I haven't actually got it to work properly yet, but what I don't understand is does this
virtual environment have to be running continuously?
If I close my remote connection, or exit the environment does the application cease to function?
And if not how do I exit the virtual environment and continue to work on the server?
The virtual environment isn't something that needs to be running. It's basically a directory where Python libraries and executables can be installed, and a handful of environment variables to ensure that:
new libraries are installed in the virtual environment
When a Python program looks for a library, it looks in the virtual environment
When the system looks for a program to run, it looks in the virtual environment first.
One of the things that happens when you activate the virtual environment is it defines a shell function called deactivate that unsets all the environment variables. So, to get out of the virtual environment, you just type deactivate.
If I close my remote connection, or exit the environment does the application cease to function?
It depends on how you've started your application. If you are just launching it from the command line, then when you close your connection the application will be stopped. Typically you want to use a service like upstart to start and manage your application (the particular service you choose is typically determined by your server's OS). When you configure that service, you'll want to make sure it runs source $your_environment_dir/bin/activate before starting your app, so that your app will run in the virtual environment.

Vagrant Berkshelf - Shelf Path?

Is it possible to set the path where the berkshelf plugin puts the cookbooks it installs? (As in the .berkshelf folder)
I am running Windows 7.
I am currently trying to install a mysql server using an opscode cookbook to a vm and here at work they have the %HOMEDRIVE% system variable set to a network drive. So when .berkshelf starts at the beginning of the Vagrantfile, it pushes the cookbooks to the network drive and it causes it to be slow and well, its not where it should be. Is there a fix to this?
VirtualBox did this as well, but I fixed it by altering the settings. I tried looking for some sort of equivalent settings for berkshelf, but the closest I got was for the standard berkshelf (thats not a vagrant plugin), it appears you can set this environment variable:
ENV['BERKSHELF_PATH']
Found here:
http://www.rubydoc.info/github/RiotGames/berkshelf/Berkshelf#berkshelf_path-class_method
I need to be able to have the cookbooks it reads from the berksfile store to my laptops local drive instead, as in my scenario I cannot have the mobility of the VM limited to the building because of files that are stored on the network.
Any incite would be much appreciated.
Perhaps its better to use the actual berkshelf over the vagrant plugin?
Thanks.
If you want to have the portability - a full chef-repo ready for chef-solo runs, better off using standalone berkshelf instead of the vagrant-berkshelf plugin - which is NOT that flexibly.
For complex cookbooks, I prefer to use standalone berkshelf as it allows me to do berks install --path chef/cookbooks to copy all cookbooks required from ~/.berkshelf/cookbooks, then I can just tar the whole thing and transfer to other machines for the same chef-solo run. some people use capistrano automate the tar and scp/rsync over the network. I just use rysnc/scp;-)
HTH

Issues with meteor app on vagrant share

I have a vagrant VM (virtualbox) setup with meteor. My host and guest are both Ubuntu. The VM contains a vboxfs share folder setup through the Vagrantfile. The behavior I am noticing is similar to a NFS mount.
I am able to create a meteor project in this shared folder, but when I run the project I get errors pointing to mongodb.
If I follow instructions on
https://github.com/pixelhandler/vagrant-dev-env/blob/master/README.md
my app works just fine.
Upon further investigation it seems that MongoDB does not work on NFS shares, http://www.mongodb.org/display/DOCS/NFS
Has anyone else run in to this issue? and if so, have you figured out a (non-rsync) solution?
I plan to send link of this question to 10gen, perhaps someone from their team can answer it.
Not sure what Mongo's plans are re running on NFS / vboxfs, but you could work around this by running your own MongoDB not in the shared folder (eg, use the ubuntu mongodb package). Use the MONGO_URL environment variable to tell meteor where to connect. If you pass this variable, meteor will not try to start MongoDB in the meteor project directory.
You can move the data dir somewhere inside the VM, and use a symlink from the vagrant folder:
cd /vagrant/.meteor/local
ln -s ~/db/
This means the data will not be shared, but you probably want it git ignored anyway.
(https://grahamrhay.wordpress.com/2013/06/18/running-meteor-in-a-vagrant-virtualbox/)
grahamrhay's solution would not work with the vagrant box started on Windows. There is no way to make symbolic links on windows for vagrant, at least not for administrator accounts.